<template>
<div class="section">
	<div class="sectionTit">分析师投票</div>
	<div class="sectionContent">
		<div class="sectionBlock">
			<ul class="clearfloat">
				<li v-bind:class="index%2==0?'l':'r'" class="voteBlock" v-for="(item, index) in analystVoteList">
					<router-link :to="{ name: 'AnalystVote', params: { type: item.id }}" exact>
						<img v-lazy="item.img" alt="item.analyst_type" />
					</router-link>
				</li>
			</ul>
		</div>
	</div>
</div>
</template>

<script>
	import axios from 'axios'
	export default {
  		name: 'analystType',
		data() {
	      return {
	        analystVoteList:""
	      }
	   },
	   mounted() {
			this.init();
		},
		methods: {
			init(){
				var _this = this;
				var domain = _this.$store.state.domain;
				axios.get(domain+'analyst_type_list').then(function(res) {
					var resData = res.data.data;
					_this.analystVoteList = resData;
					console.log(resData);
				}).catch(function(error) {
					console.log(error);
				});
			}
		
		}
	}
</script>